<template>
    <div class="container-wrap">
        <div class="container-content">
            <h2 class="header">{{title}}</h2>
            <hr class="hr">
            <rich-text :nodes="sub" style="padding:10rpx;"></rich-text>
        </div>
        <van-toast id="van-toast" />
    </div>
</template>

<script>
    import { CourseDetail } from '@/providers/service'

    export default {
        name: 'my/changePassword',
        data() {
            return {
                title: '',
                sub: ''
            }
        },
        methods: {
            async CourseDetailFn() {
                try {
                    let params = {}
                    params.ID = this.$route.query.ID
                    //                    params.ID = 35
                    let res = await CourseDetail(params)
                    if (res) {
                        this.title = res.Title
                        this.sub = res.Desc.replace(/px/g, 'rpx')
                    } else {
                        this.title = '暂无数据'
                    }
                } catch (err) {
                    console.log(err)
                }
            },
        },
        mounted() {
            this.CourseDetailFn()
        },

    }
</script>

<style lang="less" scoped>
    page {
        height: 100%;
        width: 100%;

    }

    .container-wrap {
        width: 100%;
        height: 100%;
        background: #FFF;
        letter-spacing: 5rpx;

        .hr {
            background-color: #ddd;
            height: 1rpx;
        }

        .container-content {
            font-size: 30rpx;
            width: 670rpx;
            min-height: 1111rpx;
            margin: 54rpx 36rpx 30rpx;
            background: #eeedf5;
            text-align: center;
            border-radius: 15rpx;
            word-break: break-all;

            .header {
                font-size: 36rpx;
                font-weight: 600;
                padding: 45rpx 0;
                /* height: 120rpx; */
                /* line-height: 120rpx; */
                color: #000;
            }

            .mini-header {
                margin: 28rpx auto 0rpx;
                font-weight: 400;
                color: #333;
            }

            .content {
                padding: 30rpx;
                color: #333;
            }
        }
    }
</style>
